//SPDX-FileCopyrightText: Copyright 2022-2024 深圳市同心圆网络有限公司
//SPDX-License-Identifier: GPL-3.0-only

package bulletin_dao

import "go.mongodb.org/mongo-driver/mongo"

var BulletinInfoDao *_BulletinInfoDao
var UnReadInfoDao *_UnReadInfoDao
var BulletinRecycleDao *_BulletinRecycleDao

func InitDao(mgoDb *mongo.Database) (err error) {
	BulletinInfoDao, err = newBulletinInfoDao(mgoDb)
	if err != nil {
		return
	}
	UnReadInfoDao, err = newUnReadInfoDao(mgoDb)
	if err != nil {
		return
	}
	BulletinRecycleDao, err = newBulletinRecycleDao(mgoDb)
	if err != nil {
		return
	}
	return
}
